#ifdef TIME_7_SKIP
#else
#include "view_time_7.h"
#include "view_time_7.inc"
#include "view_time_0.h"
#include "display_ctrl.h"
#include "platform_assert.h"
#include "lfs_file_manager_auto.h"
#include "rtc.h"
#include "datetime.h"
#include "blecom.h"
#include "battery_ctrl.h"
#include "sport_his.h"
#include "display_ctrl.h"
#include "display_interface_240x240.h"
#include "datetime.h"
#include "heart_rate_interface.h"
#include "font/num_font.h"
#include "font_mngr.h"
#include "view_common.h"
#include "app_trace.h"
#include "view_times.h"
//       disp_ctrl.com_data.i_temp[16]  calorie
//  disp_ctrl.com_data.i_temp[11]   step

void view_time_7_display(void)
{
    _disp_show_flash_img(DISP_LFS_FILE_INDEX_0, 0, 0, FILE_IMG_6114_back_0_0);
    int const week_index = disp_ctrl.com_data.i_temp[5] - 1;
    if (week_index >= 0 && week_index < 7)
    {
        _disp_show_flash_img(DISP_LFS_FILE_INDEX_1, 107, 51, FILE_IMG_6115_week_1_107_51 + week_index);
    }
    disp_draw_user_image_num_mid_ignore(120, 69, RGB565_COLOR_BLACK, disp_ctrl.com_data.i_temp[2], 14 + 2, num_14x20_TAB);    
    disp_draw_user_image_num_mid_ignore(120, 177, RGB565_COLOR_BLACK, disp_ctrl.com_data.i_temp[17], 11 + 1, num_11x16_TAB);
    int x = disp_draw_user_image_num_mid_ignore(60 - 6, 124, RGB565_COLOR_BLACK, disp_ctrl.com_data.i_temp[16], 11 + 1, num_11x16_TAB);
    x += 1;
    disp_draw_user_image_ignore_color(x, 124, RGB565_COLOR_BLACK, bmp_calories_unit);
    disp_draw_user_image_num_mid_ignore(180, 124, RGB565_COLOR_BLACK, disp_ctrl.com_data.i_temp[11], 11 + 1, num_11x16_TAB);

    if (disp_ctrl.loop_cnt == 0)
    {
        disp_ctrl.auto_refresh_time = 1000;
        disp_ctrl.com_data.i_temp[22] = (RTCGetSeconds() % 60) * 6;
        uint16_t temp16 = get_present_day_minute();
        disp_ctrl.com_data.i_temp[23] = (temp16 / 2) / 6 * 6 % 360; //时针的角度
        disp_ctrl.com_data.i_temp[24] = (temp16 * 6) / 6 * 6 % 360; //分针的角度
                                                                    // #warning debug
        //  disp_ctrl.com_data.i_temp[22] = (7) * 6;
        // disp_ctrl.com_data.i_temp[23] = ((RTCGetSeconds() + 15) % 60) * 6;
        // disp_ctrl.com_data.i_temp[24] = ((RTCGetSeconds() + 37) % 60) * 6;
    }

    // disp_draw_img_rotate_with_solid(gImage_hour, 0, 66, (119 << 16) | 119, disp_ctrl.com_data.i_temp[23], RGB565_COLOR_WHITE, false);     //-3
    // disp_draw_img_rotate_with_solid(gImage_hour_back, 0, 64, (119 << 16) | 119, disp_ctrl.com_data.i_temp[23], RGB565_COLOR_BLACK, true); //-3

    // disp_draw_img_rotate_with_solid(gImage_minute, 0, 115, (119 << 16) | 119, disp_ctrl.com_data.i_temp[24], RGB565_COLOR_WHITE, false);     //-7
    // disp_draw_img_rotate_with_solid(gImage_minute_back, 0, 113, (119 << 16) | 119, disp_ctrl.com_data.i_temp[24], RGB565_COLOR_BLACK, true); //-7

    disp_draw_user_image_filter_color(113, 114, bmp_center_big);
    disp_draw_user_image(117, 118, bmp_center_small);
    // disp_draw_img_rotate_with_solid(gImage_second, 0, 98, (119 << 16) | 119, disp_ctrl.com_data.i_temp[22], 0xf800, false);
    // disp_draw_img_rotate_with_solid(gImage_second_back_1, 0, 7, (119 << 16) | 119, disp_ctrl.com_data.i_temp[22], RGB565_COLOR_WHITE, false);
    // disp_draw_img_rotate_with_solid(gImage_second_back_2, 0, 3, (119 << 16) | 119, disp_ctrl.com_data.i_temp[22], RGB565_COLOR_BLACK, true);
    disp_draw_img_rotate(gImage_hour, 0, 66, (119 << 16) | 119, disp_ctrl.com_data.i_temp[23]);    //-3
    disp_draw_img_rotate(gImage_minute, 0, 115, (119 << 16) | 119, disp_ctrl.com_data.i_temp[24]); //-7
    disp_draw_img_rotate(gImage_second, 0, 98, (119 << 16) | 119, disp_ctrl.com_data.i_temp[22]);
}
#endif
